/*
 * p2693.cpp
 *
 *  Created on: 2013-5-22
 *      Author: zy
 */

#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
const int maxn = 250;
const double EPS = 1e-6;
const double PI = acos(-1.0);
int sig(double d)
{
	return fabs(d) < EPS ? 0 : d < 0 ? -1 : 1;
}
struct Point
{
	double x, y;
} p[maxn];
double sqr(double x)
{
	return x * x;
}
double dis(Point a, Point b)
{
	return sqrt(sqr(a.x - b.x) + sqr(a.y - b.y));
}
struct MEP_Nod
{
	double A;
	int M;
	bool operator <(const MEP_Nod &nod) const
	{

		return sig(A - nod.A) ? A < nod.A : M > nod.M;
	}
	void set(double A, int M)
	{
		if (sig(A - 2 * PI) >= 0)
			A -= 2 * PI;
		else if (sig(A) < 0)
			A += 2 * M - PI;
		this ->A = A;
		this ->M = M;
	}
};

int MEP(Point *p, int n)
{
	static MEP_Nod N[500];
	int s, tmp, tmpMax, ans;
	double theta, alpha, d, di;
	ans = 0;
	for (int i = 0; i < n; i++)
	{
		s = 0;
		for (int j = 0; j < n; j++)
		{
			if (i == j || sig((di = dis(p[i], p[j])) - 5.0) > 0)
				continue;
			theta = atan2(p[j].y - p[i].y, p[j].x - p[i].x);
			alpha = acos(di / 5.0);
			N[s++].set(theta - alpha, 1);
			N[s++].set(theta + alpha, -1);
			if (sig(N[s - 2].A - N[s - 1].A) > 0)
			{
				d = N[s - 1].A;
				N[s - 1].A = 2 * PI;
				N[s++].set(0, -1);
				N[s++].set(d, -1);
			}
		}
		sort(N, N + s);
		tmp = tmpMax = 0;
		for (int j = 0; j < s; j++)
		{
			tmp += N[j].M;
			tmpMax = max(tmp, tmpMax);
		}
		ans = max(ans, tmpMax);
	}
	return ans + 1;
}
int main()
{
	int n = 0;
	while (scanf("%lf%lf", &p[n++].x, &p[n].y) != EOF)
		;
	n--;
	printf("%d\n", MEP(p, n));
	return 0;
}
